#include <wininet.h> /* For HINTERNET definition */

/* General define */

#define UPDATE_EXPORT __declspec(dllexport)

/* Functions defined in update.c */

UPDATE_EXPORT void UpdateClean();
void ErrorExit(HINTERNET, bool);
void ControlCreate(HWND);
LRESULT CALLBACK UpdateProc(HWND, UINT, WPARAM, LPARAM);
HANDLE DownloadAndWriteLocalFile(HINTERNET);
UPDATE_EXPORT HWND UpdateDialog(HWND, const int);
bool DownloadPlayerUpdate(void);
DWORD WINAPI ThreadFunc(LPVOID);

/* Struct for passing handles to the thread function */

typedef struct
{
    HWND      hwnd;
    HINTERNET hInitConnect;
	int		  iFileVersion;
} PARAMS, *PPARAMS;
